#include <SFML/Window.hpp>
#include <SFML/System.hpp>
#include <SFML/Config.hpp>

#include <GL/glew.h>
#include <string.h>

/*! @brief SFMLWindow wrapper       */

class SFMLWindow
{
	public : 

    /************************************************/
    /*              Member                          */
    /************************************************/

        /************************************************/
        /*              Properties                      */
        /************************************************/


        sf::Window *        m_Window;           /*! The sfml window object. Represent the actual window */
        sf::VideoMode*      m_VideoMode;        /*! A sfml window always containt a video mode          */

        sf::Event           m_Event;            /*! All events (mouse move, key down etc) occuring between two refresh can be
                                                 *  queried by sf::Window::pollEvent function. The pollEvent func will feed an sf::Event object with the
                                                 *  first event gathered in the stack, and so on. So, each frame, I have to check the pollEvent stack, queried one Event, process
                                                 *  it, and continue until all event have been processed
                                                 */

        void (*m_LoopFunc)(void);

        int             m_Width;
        int             m_Height;

        std::string     m_Title;

        float           m_CurrentTime;      /*!< Time at current frame  */
        float           m_PreviousFrame;    /*!< Time at previous frame */

        float           m_Delta;            /*!< Time interval between two frames                                                   */
        int             m_Framerate;        /*!< Desired user framerate. The loop function will be refresh according to this value  */


        int             m_Run;              /*!< Keep the gameLoop running      */
        sf::Clock       m_Clock;

        /************************************************/
        /*              Methods                         */
        /************************************************/


    /************************************************/
    /*              Virtual                         */
    /************************************************/

    /************************************************/
    /*              Constructor                     */
    /************************************************/

    SFMLWindow(int width, int height);
    SFMLWindow(int width, int height, int framerate);
    SFMLWindow(int width, int height, int framerate, std::string title);

    void SetProperties(int width, int height, int framerate, std::string title);


};
